local bMats = {}
bMats.Glow1 = StarGate.MaterialFromVMT(
	"sc_blue_ball01",
	[["UnLitGeneric"
	{
		"$basetexture"		"sprites/physcannon_bluecore2b"
		"$nocull" 1
		"$additive" 1
		"$vertexalpha" 1
		"$vertexcolor" 1
	}]]
)

bMats.Glow2 = StarGate.MaterialFromVMT(
	"sc_blue_ball02",
	[["UnLitGeneric"
	{
		"$basetexture"		"effects/bluemuzzle"
		"$nocull" 1
		"$additive" 1
		"$vertexalpha" 1
		"$vertexcolor" 1
	}]]
)

local lMats = {}
lMats.Glow1 = StarGate.MaterialFromVMT(
	"sc_crystal_beam1",
	[["UnLitGeneric"
	{
		"$basetexture"		"sprites/crystal_beam1"
		"$nocull" 1
		"$additive" 1
		"$vertexalpha" 1
		"$vertexcolor" 1
	}]]
)
lMats.Glow2 = StarGate.MaterialFromVMT(
	"sc_blue_beam01",
	[["UnLitGeneric"
	{
		"$basetexture"		"sprites/bluelight1"
		"$nocull" 1
		"$additive" 1
		"$vertexalpha" 1
		"$vertexcolor" 1
	}]]
)

lMats.Glow3 = StarGate.MaterialFromVMT(
	"sc_blue_beam02",
	[["UnLitGeneric"
	{
		"$basetexture"		"sprites/physbeam"
		"$nocull" 1
		"$additive" 1
		"$vertexalpha" 1
		"$vertexcolor" 1
	}]]
)

/*---------------------------------------------------------
   Init( data table )
---------------------------------------------------------*/
function EFFECT:Init( data )

	self.StartPos 	= data:GetStart()	
	self.EndPos 	= data:GetOrigin()
	self.Multi 		= data:GetMagnitude()
	
	self.Entity:SetRenderBoundsWS( self.StartPos, self.EndPos )	
	
end

/*---------------------------------------------------------
   THINK
---------------------------------------------------------*/
function EFFECT:Think( )

	return false
    
end

/*---------------------------------------------------------
   Draw the effect
---------------------------------------------------------*/
function EFFECT:Render( )

	render.SetMaterial( lMats.Glow2 )	
   	render.DrawBeam( self.StartPos, self.EndPos, 32, 2*CurTime(), (2*CurTime())+(0.001*self.Multi), Color( 2255, 255, 255, 255 ) )
   	
   	render.SetMaterial( lMats.Glow3 )	
   	render.DrawBeam( self.StartPos, self.EndPos, 32, 2*CurTime(), (2*CurTime())+(0.002*self.Multi), Color( 255, 255, 255, 255 ) )
   	
   	render.SetMaterial(	bMats.Glow1 )
   	render.DrawSprite(self.EndPos, 64, 64, Color(255, 255, 255, 255))
   	
   	render.SetMaterial( bMats.Glow2 )
   	render.DrawSprite(self.StartPos, 64, 64, Color(255, 255, 255, 255))    	
					 
end
